<!DOCTYPE html>
<html>

<head>
<title>签到平台</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet"
	href="${ctxPath}/assets/common/libs/layui/css/layui.css" />
<style>
.attendance-body {
	width: 285px;
	height: 285px;
	padding-top: 20px;
	margin: auto;
}

.attendance-body-img {
	width: 90%;
	height: 90%;
	border-radius:2em;
	border: 5px solid #1e9fff
}

.attendance-body-name {
	font-size: xx-large;
	text-align: center;
	padding-bottom: 20px;
	color: #1e9fff;
}

.attendance-body-lab {
	text-align: center;
	font-size: large;
}

</style>
	<script type="text/javascript" src="http://wwcdn.weixin.qq.com/node/wework/wwopen/js/wwLogin-1.2.4.js"></script>
</head>

<body>
	<div id = "login-wrapper" class="login-wrapper">

		<div class="attendance-body">
			<div class="attendance-body-name">${name!}</div>
			<img src="${avatar}" class="attendance-body-img">
			<label id="lab" class="attendance-body-lab"></label>
		</div>

	</div>

	<div class="layui-row layui-col-space1" >
		<div class="layui-col-md3">
			<div class="qrcode-item" id="wx_reg">
			</div>
		</div>
	</div>


</body>
<script>
	var i = 7;
	document.getElementById("lab").innerText = "["+ i + "]秒后自动跳转...";
	var timer = null;
	function change()
	{
		var lab = document.getElementById("lab");
		i--;
		lab.innerText = "["+ i + "]秒后自动跳转...";
		var div = document.getElementById("login-wrapper");
		if(i==0)
		{
			div.style.display = 'none';
			var wwLogin = new WwLogin({
				"id" : "wx_reg",
				"appid" : "${appid!}",
				"agentid" : "${agentid}",
				"redirect_uri" :"${redirect_uri!}",
				"state" : "${state}",
				"href" : "${href}",
				"lang": "zh"
			});

		}
	}

	function start_timer()
	{
		timer = window.setInterval("change()", 1000);
	}

	start_timer();
</script>
</html>
